package mybatis.dao;

import java.math.BigDecimal;
import java.util.List;


import mybatis.entity.Cart;
import org.apache.ibatis.annotations.Param;


public interface CartDao {
	public void add(@Param("gid") int gameId,@Param("uid") int userId,@Param("count") int gameCount,@Param("osum") BigDecimal originalSum,@Param("fsum") BigDecimal finalSum);
	public List<Cart> findByUid(int userId);
	public Cart findByUidAndGid (@Param("gid") int gameId,@Param("uid") int userId);
	public void changeCount(@Param("id") int cartId,@Param("count") int count,@Param("oprice") BigDecimal oprice,@Param("fprice") BigDecimal fprice);
	public void deleteByGid(@Param("gid")int gameId,@Param("uid") int userId);
	public Cart findByCid(int cartid);
	public void submitCart(@Param("cartid")int cartid,@Param("onumber")String order_number);
	public void removeByCid(int id);
}
